<!-- /* Description for file.
 * 联系记录添加
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/contacts
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0712
 * @lastmodified  张海杰2011年0712
 */
 -->

<?php
echo $html->css ( 'jquery-validate/css/screen' );
//echo $javascript->link('jquery');
	echo $html->css('flexigrid');
	echo $html->css('start/jquery-ui-1.8.2.custom');
	echo $javascript->link('flexigrid/flexigrid'); 
	//echo $javascript->link('DatePicker/WdatePicker');
	echo $javascript->link('jquery-ui-1.8.2.custom.min');
?>
<script type="text/javascript">
//添加验证
$(document).ready(function() {
	
	$.validator.setDefaults({       
		 submitHandler: function(form) {    
		  form.submit();    
		}       
	});   
			
		$("#ContactSaveForm").validate({
		rules: {
		"data[Contact][companyName]":{
		required: false,string:true,stringMinLength:0,stringMaxLength:20
		},
		"data[Contact][remindSpacing]":{
		required: false,digits:true
		},//间隔提醒
		"data[Contact][remindBefore]":{
		required: false,digits:true
		},//提前提醒
		"data[Contact][context]":{
			required: false,stringMinLength:0,stringMaxLength:255
		}, 
		"data[Contact][memo]":{
			required: false,stringMinLength:0,stringMaxLength:600
		}}, 
		messages:{},
		focusInvalid:false,
		onkeyup:false,
		errorPlacement:function(error, element){error.appendTo(element.parent());}
	});
});
//验证结束
</script>


<script type="text/javascript">
	$(function(){
		$(".datepickerSpan :input").datepicker({
			inline: true
		});
		 $('.datepickerSpan :input').datepicker('option', {dateFormat: "yy-mm-dd"});
		 $('.datepickerSpan :input').datepicker( "option", "closeText", 'X' );
	});
</script>

<script type="text/javascript">
	$(function()
		{
			$("#close").click(function(){		
				window.close();							
			});
		});
</script>

<script type="text/javascript">
  var message="<?php echo $message; ?>";
  if(message!="")
  {
	window.opener.tablereload(message);
 	window.close();
  }
</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Projectmanagements');//一级目录
										   echo '>';echo __('Projectmanagements');//二级目录
										   echo '>';echo __('History Candidate Management');//三级目录
										   echo '>';echo __('Linklogs');//四级目录
										   echo '>';
										   ?>
									<?php echo $html->tag('span', __('Add',true).__('Linklogs',true));//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<div class="tabflex">
<fieldset><legend><?php echo  __('Linklogs');//联系信息?></legend>
<?php echo $form->create('Contact',array('action'=>'save','type'=> 'post'));?>
<?php echo $form->hidden('projectmanagement_id',array('default'=>$projectmanagementid));?>	
<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
		<tr>
			<td></td>
			<td>企业名称:</td>
			<td >
			<?php 
				echo $form->input('companyName',array('label'=>false));
			?>
			</td>
		</tr>
		<tr>
			<td width="5%"></td>
			<td width="10%">联系人姓名:</td>
			<td width="30%">
			<?php 
				echo $form->input('linkman_id',array('options'=>$op1,'label'=>false,'class' => 'TextBoxE0'));
			?>
			</td>
			<td width="5%"></td>
			<td width="10%">顾问:</td>
			<td width="30%">
			<?php 
				echo $form->input('advisor',array('options'=>$op,'label'=>false,'class' => 'TextBoxE0'));
			?>
			</td>
		</tr>
		<tr>
			<td></td>
			<td>联系时间:</td>
			<td >
			<?php 
				echo $form->input('linkTime',array('label'=>false,'monthNames' => false,'dateFormat'=>'YMD', 'timeFormat'=> '24','div'=>false));
			?>
			</td>
			<td></td>
			<td>提前提醒:</td>
			<td>
			<?php 
				echo $form->input('remindBefore',array('label'=>false,'div'=>false,'after'=>'&nbsp;天'));
			?>
			</td>
		</tr>
		<tr>
		<td></td>
		<td>下次联系时间:</td>
			<td>
			<?php 
				echo $form->input('nextLinkTime',array('label'=>false,'monthNames' => false,'dateFormat'=>'YMD', 'timeFormat'=> '24','div'=>false));
			?>
			</td>
			<td></td>
			<td>间隔提醒:</td>
			<td>
			<?php 
				echo $form->input('remindSpacing',array('label'=>false,'div'=>false,'after'=>'&nbsp;分'));
			?>
			</td>
		</tr>
</table>
</fieldset>
<fieldset><legend>记录信息</legend>
<table width="100%" cellspacing="0" cellpadding="0" border="0"
	style="text-align: left">
		<tr>
			<td width="5%"></td>
			<td width="10%">记录添加者:</td>
			<td width="30%">
			<?php 
				echo $form->input('creater',array('label'=>false,'default'=>"$username",'disabled'=>'true'));
			?>
			</td>
			<td width="5%"></td>
			<td  width="10%">记录添加时间:</td>
			<td  width="30%">
			<?php 
				$showtime=date("Y-m-d H:i:s"); //上传的时间
				echo $form->input('',array('label'=>false,'default'=>"$showtime",'disabled'=>'true'));
			?>
			</td>
		</tr>
		<tr>
			<td></td>
			<td style="vertical-align:top;">具体内容:</td>
			<td colspan="4">
			<?php 
				echo $form->textarea('context',array('label'=>false,'class' => 'TextArea1 txtOut'));
			?>
			</td>
		</tr>
		<tr>
		<td ></td>
		<td style="vertical-align:top;">备注:</td>
		<td colspan="4">
		<?php 
			echo $form->textarea('memo',array('label'=>false,'class' => 'TextArea1 txtOut'));
		?>
		</td>
		</tr>
</table>
</fieldset>
</div>
<table width="100%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
		<td width="100"><?php echo $form->button('新增',array('type'=>'submit','class'=>'oksubmit'));?>  <!-- __('reset', true)取消-->
		<td width="100"><?php echo $form->button('关闭',array('class'=>'cancelbutton','id'=>'close'));?>  <!-- __('reset', true)取消-->
		</td>
	</tr>
</table>
<?php echo $form->end();?>

